Skip to content

Conversation

@jbaicoianu
Copy link
Contributor

@jbaicoianu jbaicoianu commented May 5, 2016

This change is specifically for the Emscripten build, it allows the containing website to access the SDL_SendKeyboardKey function directly, which is useful for linking webpage UI elements with the running emulator instance.

@jbaicoianu jbaicoianu changed the title Export SDL_SendKeyboardKey function to allow scancode injection Export SDL_SendKeyboardKey function to allow scancode injection in Emscripten build May 5, 2016
@rb6502 rb6502 merged commit 18014a8 into mamedev:master May 5, 2016
@felipesanches
Copy link
Contributor

@jbaicoianu This sounds interesting. Could you showcase an example of such usage?

@jbaicoianu
Copy link
Contributor Author

@felipesanches sure - on archive.org we use a virtual keyboard to provide an easy interface for people to access necessary functions which don't map to obvious keyboard keys, like "add coin", "player 1 start", "reset", etc.

For example, https://archive.org/details/arcade_outrun - after pressing the "power" button to boot the emulator, the virtual keyboard should load.

The version currently used on the website does this using synthetic DOM events and an older version of MAME, but newer versions built with SDL2 don't work with these synthetic events. This change lets us bypass that and just inject SDL scancodes directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants